public class test {
    public static void main(String[] args) {
        int[] score = new int[5];
        Scanner scan = new Scanner(System.in);
        int a, i = 0;
        while (true) {
            System.out.println("请输入" + (i + 1) + "位同学的成绩");
            a = scan.nextInt();
            if (a >= 0 && a <= 100) {
                score[i] = a;
                i++;
            } else {
                System.out.println("输入错误，请重新输入");
            }
            if (i == score.length)
                break;
        }
        String[] name = new String[5];
        for (int j = 0; j < name.length; j++) {
            System.out.println("请输入" + (j + 1) + "位同学的姓名");
            name[j] = scan.next();
        }
        for (int m = 0; m < score.length; m++) {
            System.out.print(name[m] + score[m]);
            System.out.println();
        }
    }
}